package xyz.lne.researchgroupmanage.common;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;
import org.springframework.http.HttpStatus;

@Getter
@AllArgsConstructor
@ToString
public enum ErrorCode {
    RESOURCE_NOT_FOUND(1001, HttpStatus.NOT_FOUND, "未找到该资源"),
    REQUEST_VALIDATION_FAILED(1002, HttpStatus.BAD_REQUEST, "请求数据格式验证失败"),
    USER_PASSWORD_ERROR(2002, HttpStatus.BAD_REQUEST, "用户名或密码错误"),
    BAD_TOKEN(2003, HttpStatus.BAD_REQUEST, "TOKEN错误"),
    BAD_REQUEST(2004, HttpStatus.BAD_REQUEST, "请求有误"),
    LOW_POWER(2005, HttpStatus.BAD_REQUEST, "权限不足"),
    File_ERROR(2006, HttpStatus.BAD_REQUEST, "文件异常"),
    ;


    int code;
    HttpStatus status;
    String message;
}
